
package com.jf.cloud.multishop.controller.platform;

import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.multishop.service.ShopBankCardService;
import com.jf.cloud.multishop.vo.ShopBankCardVO;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zz
 * @Date 2021/4/26 10:09
 */
@RestController
@RequestMapping("/p/shop_bank_card")
@Tag(name = "platform-店铺银行卡信息")
public class ShopBankCardController {

    @Autowired
    private ShopBankCardService shopBankCardService;

    @GetMapping("/list_by_shop_id")
    @Operation(summary = "根据店铺id批量获取银行卡信息")
    public ServerResponseEntity<List<ShopBankCardVO>> listByShopId(@RequestParam(value = "shopId") Long shopId) {
        List<ShopBankCardVO> shopBankCardVOList = shopBankCardService.listByShopId(shopId);
        return ServerResponseEntity.success(shopBankCardVOList);
    }

}
